/* GUI CONVERTED from rccpciq.p (converter v1.75) Tue Apr 10 12:03:31 2001 */
/* rccpciq.p - Release Management Customer Schedules                          */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.3.1.3 $                                                         */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 7.3      LAST MODIFIED: 10/09/92   BY: *G462* Bill Gates         */
/* REVISION: 7.3      LAST MODIFIED: 11/06/96   BY: *G2J2* Suresh Nayak       */
/* REVISION: 8.6      LAST MODIFIED: 02/25/98   BY: *K1JK* Beena Mol          */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* Mark Brown         */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.3.1.3 $    BY: Jean Miller    DATE: 03/22/01 ECO: *P008*          */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* CUSTOMER PERIOD CALENDAR INQUIRY */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "b+ "}


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
cpc_cust       colon 30  ad_name at 50 no-label
   cpc_year       colon 30
   cpc_type       colon 30
   cpc_desc       colon 30
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

{wbrp01.i}

mainloop:
repeat with frame a:

   if c-application-mode <> "WEB" then
   prompt-for
      cpc_cust
      cpc_year
      cpc_type
   editing:

      /* FIND NEXT/PREVIOUS RECORD */
      {mfnp.i cpc_mstr cpc_cust cpc_cust cpc_cust cpc_cust cpc_cust}

      if recno <> ? then do:
         find ad_mstr where ad_addr = cpc_cust no-lock no-error.
         display
            cpc_cust
            ad_name when (available ad_mstr)
            cpc_year
            cpc_type
            cpc_desc.
      end.
   end.

   {wbrp06.i &command = prompt-for &fields = " cpc_cust cpc_year cpc_type"
             &frm = "a"}

   if (c-application-mode <> "WEB") or
      (c-application-mode = "WEB" and
      (c-web-request begins "DATA")) then do:

      /* ADD/MOD/DELETE  */
      find cpc_mstr using
           cpc_cust and
           cpc_year and
           cpc_type
      no-error.

      if not available cpc_mstr
      then do:
         /* Customer Calendar does not exist */
         {pxmsg.i &MSGNUM=8100 &ERRORLEVEL=3}
         if c-application-mode = "WEB" then return.
         undo, retry.
      end.

      find ad_mstr where ad_addr = cpc_cust no-lock no-error.

      display
         ad_name when (available ad_mstr)
         cpc_desc.

      hide frame b.

   end.

   /* OUTPUT DESTINATION SELECTION */
   {gpselout.i &printType = "terminal"
               &printWidth = 80
               &pagedFlag = " "
               &stream = " "
               &appendToFile = " "
               &streamedOutputToTerminal = " "
               &withBatchOption = "no"
               &displayStatementType = 1
               &withCancelMessage = "yes"
               &pageBottomMargin = 6
               &withEmail = "yes"
               &withWinprint = "yes"
               &defineVariables = "yes"}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


   for each cpcd_det where
            cpcd_cust = cpc_cust and
            cpcd_year = cpc_year and
            cpcd_type = cpc_type
   no-lock with frame b width 80:

      /* SET EXTERNAL LABELS */
      setFrameLabels(frame b:handle).

      display
         space(25)
         cpcd_per
         cpcd_start
         cpcd_end WITH STREAM-IO /*GUI*/ .

   end.

   {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

   {pxmsg.i &MSGNUM=8 &ERRORLEVEL=1}

end.

status input.

{wbrp04.i &frame-spec = a}
